<!DOCTYPE html>
<html>
    <head>
        <title>demo</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
        <style>
            body {
                font-family: Monospace;
                background-color: #f0f0f0;
                margin: 0px;
                overflow: hidden;
            }
        </style>
    </head>
    <body>
        <script src="https://cdn.bootcdn.net/ajax/libs/three.js/73/three.js"></script>
        <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script src="https://cdn.bootcdn.net/ajax/libs/tween.js/0.11.0/Tween.min.js"></script>
		<script src="https://unpkg.com/three@0.73.1/examples/js/controls/TrackballControls.js"></script>
        <script src="https://cdn.bootcdn.net/ajax/libs/stats.js/10/Stats.min.js"></script>
        <script>

            var jsonstr = '[{"boxId":"94264000100U089","x":-16.350000,"y":-3.500000,"z":-573.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":149.000000,"platform":"platform25","order":1,"material":"","type":1,"place":200},{"boxId":"94264000100U083","x":-16.350000,"y":-3.500000,"z":-528.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":149.000000,"platform":"platform25","order":2,"material":"","type":1,"place":200},{"boxId":"94264000100U073","x":-16.350000,"y":-3.500000,"z":-483.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":149.000000,"platform":"platform25","order":3,"material":"","type":1,"place":200},{"boxId":"94264000100U062","x":-16.350000,"y":-3.500000,"z":-438.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":149.000000,"platform":"platform25","order":4,"material":"","type":1,"place":200},{"boxId":"94264000100U088","x":-16.350000,"y":-3.500000,"z":-393.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":149.000000,"platform":"platform25","order":5,"material":"","type":1,"place":200},{"boxId":"94264000100U082","x":-16.350000,"y":-3.500000,"z":-348.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":149.000000,"platform":"platform25","order":6,"material":"","type":1,"place":200},{"boxId":"94264000100U079","x":-16.350000,"y":-3.500000,"z":-303.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":149.000000,"platform":"platform25","order":7,"material":"","type":1,"place":200},{"boxId":"94264000100T905","x":-16.350000,"y":-3.500000,"z":-258.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":8,"material":"","type":1,"place":200},{"boxId":"94264000100T881","x":-16.350000,"y":-3.500000,"z":-213.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":9,"material":"","type":1,"place":200},{"boxId":"94264000100T899","x":-16.350000,"y":-3.500000,"z":-168.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":10,"material":"","type":1,"place":200},{"boxId":"94264000100T887","x":-16.350000,"y":-3.500000,"z":-123.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":11,"material":"","type":1,"place":200},{"boxId":"94264000100T893","x":-16.350000,"y":-3.500000,"z":-78.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":12,"material":"","type":1,"place":200},{"boxId":"94264000100T904","x":-16.350000,"y":-3.500000,"z":-33.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":13,"material":"","type":1,"place":200},{"boxId":"94264000100T880","x":-16.350000,"y":-3.500000,"z":11.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":14,"material":"","type":1,"place":200},{"boxId":"94264000100T898","x":-16.350000,"y":-3.500000,"z":56.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":15,"material":"","type":1,"place":200},{"boxId":"94264000100T886","x":-16.350000,"y":-3.500000,"z":101.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":16,"material":"","type":1,"place":200},{"boxId":"94264000100T892","x":-16.350000,"y":-3.500000,"z":146.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":17,"material":"","type":1,"place":200},{"boxId":"94264000100T820","x":-16.350000,"y":-3.500000,"z":191.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":18,"material":"","type":1,"place":200},{"boxId":"94264000100T826","x":-16.350000,"y":-3.500000,"z":236.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":19,"material":"","type":1,"place":200},{"boxId":"94264000100T838","x":-16.350000,"y":-3.500000,"z":281.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":20,"material":"","type":1,"place":200},{"boxId":"94264000100T832","x":-16.350000,"y":-3.500000,"z":326.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":21,"material":"","type":1,"place":200},{"boxId":"94264000100T844","x":-16.350000,"y":-3.500000,"z":371.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":22,"material":"","type":1,"place":200},{"boxId":"94264000100T819","x":-16.350000,"y":-3.500000,"z":416.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":23,"material":"","type":1,"place":200},{"boxId":"94264000100T825","x":-16.350000,"y":-3.500000,"z":461.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":24,"material":"","type":1,"place":200},{"boxId":"94264000100T837","x":-16.350000,"y":-3.500000,"z":506.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":25,"material":"","type":1,"place":200},{"boxId":"94264000100T831","x":-16.350000,"y":-3.500000,"z":551.500000,"width":45.000000,"height":220.000000,"length":199.100006,"weight":146.000000,"platform":"platform25","order":26,"material":"","type":1,"place":200},{"boxId":"94264000100U005","x":98.699997,"y":-108.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":27,"material":"","type":1,"place":100},{"boxId":"94264000100U025","x":98.699997,"y":-108.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":28,"material":"","type":1,"place":100},{"boxId":"94264000100U001","x":98.699997,"y":-108.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":29,"material":"","type":1,"place":100},{"boxId":"94264000100T985","x":98.699997,"y":-98.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":30,"material":"","type":1,"place":100},{"boxId":"94264000100T977","x":98.699997,"y":-98.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":31,"material":"","type":1,"place":100},{"boxId":"94264000100T973","x":98.699997,"y":-98.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":32,"material":"","type":1,"place":100},{"boxId":"94264000100T961","x":98.699997,"y":-88.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":33,"material":"","type":1,"place":100},{"boxId":"94264000100T965","x":98.699997,"y":-88.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":34,"material":"","type":1,"place":100},{"boxId":"94264000100T957","x":98.699997,"y":-88.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":35,"material":"","type":1,"place":100},{"boxId":"94264000100U009","x":98.699997,"y":-78.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":36,"material":"","type":1,"place":100},{"boxId":"94264000100T997","x":98.699997,"y":-78.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":37,"material":"","type":1,"place":100},{"boxId":"94264000100T980","x":98.699997,"y":-78.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":38,"material":"","type":1,"place":100},{"boxId":"94264000100U052","x":98.699997,"y":-68.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":39,"material":"","type":1,"place":100},{"boxId":"94264000100U056","x":98.699997,"y":-68.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":40,"material":"","type":1,"place":100},{"boxId":"94264000100U044","x":98.699997,"y":-68.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":41,"material":"","type":1,"place":100},{"boxId":"94264000100T988","x":98.699997,"y":-58.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":42,"material":"","type":1,"place":100},{"boxId":"94264000100U016","x":98.699997,"y":-58.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":43,"material":"","type":1,"place":100},{"boxId":"94264000100U012","x":98.699997,"y":-58.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":44,"material":"","type":1,"place":100},{"boxId":"94264000100U036","x":98.699997,"y":-48.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":45,"material":"","type":1,"place":100},{"boxId":"94264000100T992","x":98.699997,"y":-48.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":46,"material":"","type":1,"place":100},{"boxId":"94264000100T968","x":98.699997,"y":-48.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":47,"material":"","type":1,"place":100},{"boxId":"94264000100U060","x":98.699997,"y":-38.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":48,"material":"","type":1,"place":100},{"boxId":"94264000100U020","x":98.699997,"y":-38.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":49,"material":"","type":1,"place":100},{"boxId":"94264000100U040","x":98.699997,"y":-38.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":50,"material":"","type":1,"place":100},{"boxId":"94264000100U048","x":98.699997,"y":-28.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":51,"material":"","type":1,"place":100},{"boxId":"94264000100U032","x":98.699997,"y":-28.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":52,"material":"","type":1,"place":100},{"boxId":"94264000100U028","x":98.699997,"y":-28.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":53,"material":"","type":1,"place":100},{"boxId":"94264000100U004","x":98.699997,"y":-18.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":54,"material":"","type":1,"place":100},{"boxId":"94264000100U024","x":98.699997,"y":-18.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":55,"material":"","type":1,"place":100},{"boxId":"94264000100U000","x":98.699997,"y":-18.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":56,"material":"","type":1,"place":100},{"boxId":"94264000100T984","x":98.699997,"y":-8.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":57,"material":"","type":1,"place":100},{"boxId":"94264000100T976","x":98.699997,"y":-8.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":58,"material":"","type":1,"place":100},{"boxId":"94264000100T972","x":98.699997,"y":-8.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":59,"material":"","type":1,"place":100},{"boxId":"94264000100T960","x":98.699997,"y":1.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":60,"material":"","type":1,"place":100},{"boxId":"94264000100T964","x":98.699997,"y":1.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":61,"material":"","type":1,"place":100},{"boxId":"94264000100T956","x":98.699997,"y":1.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":62,"material":"","type":1,"place":100},{"boxId":"94264000100U008","x":98.699997,"y":11.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":63,"material":"","type":1,"place":100},{"boxId":"94264000100T996","x":98.699997,"y":11.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":64,"material":"","type":1,"place":100},{"boxId":"94264000100T941","x":98.699997,"y":11.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":65,"material":"","type":1,"place":100},{"boxId":"94264000100T933","x":98.699997,"y":21.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":66,"material":"","type":1,"place":100},{"boxId":"94264000100T945","x":98.699997,"y":21.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":67,"material":"","type":1,"place":100},{"boxId":"94264000100T937","x":98.699997,"y":21.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":68,"material":"","type":1,"place":100},{"boxId":"94264000100T953","x":98.699997,"y":31.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":69,"material":"","type":1,"place":100},{"boxId":"94264000100T917","x":98.699997,"y":31.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":70,"material":"","type":1,"place":100},{"boxId":"94264000100T921","x":98.699997,"y":31.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":71,"material":"","type":1,"place":100},{"boxId":"94264000100T949","x":98.699997,"y":41.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":72,"material":"","type":1,"place":100},{"boxId":"94264000100T925","x":98.699997,"y":41.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":73,"material":"","type":1,"place":100},{"boxId":"94264000100T929","x":98.699997,"y":41.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":74,"material":"","type":1,"place":100},{"boxId":"94264000100T913","x":98.699997,"y":51.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":75,"material":"","type":1,"place":100},{"boxId":"94264000100T940","x":98.699997,"y":51.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":76,"material":"","type":1,"place":100},{"boxId":"94264000100T932","x":98.699997,"y":51.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":77,"material":"","type":1,"place":100},{"boxId":"94264000100T944","x":98.699997,"y":61.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":78,"material":"","type":1,"place":100},{"boxId":"94264000100T936","x":98.699997,"y":61.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":79,"material":"","type":1,"place":100},{"boxId":"94264000100T952","x":98.699997,"y":61.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":80,"material":"","type":1,"place":100},{"boxId":"94264000100T916","x":98.699997,"y":71.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":81,"material":"","type":1,"place":100},{"boxId":"94264000100T920","x":98.699997,"y":71.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":82,"material":"","type":1,"place":100},{"boxId":"94264000100T948","x":98.699997,"y":71.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":83,"material":"","type":1,"place":100},{"boxId":"94264000100T924","x":98.699997,"y":81.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":84,"material":"","type":1,"place":100},{"boxId":"94264000100T928","x":98.699997,"y":81.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":85,"material":"","type":1,"place":100},{"boxId":"94264000100T912","x":98.699997,"y":81.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":86,"material":"","type":1,"place":100},{"boxId":"94264000100T810","x":98.699997,"y":91.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":87,"material":"","type":1,"place":100},{"boxId":"94264000100T790","x":98.699997,"y":91.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":88,"material":"","type":1,"place":100},{"boxId":"94264000100T814","x":98.699997,"y":91.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":89,"material":"","type":1,"place":100},{"boxId":"94264000100T806","x":98.699997,"y":101.500000,"z":-521.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":90,"material":"","type":1,"place":100},{"boxId":"94264000100T798","x":98.699997,"y":101.500000,"z":-371.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":91,"material":"","type":1,"place":100},{"boxId":"94264000100T802","x":98.699997,"y":101.500000,"z":-221.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":92,"material":"","type":1,"place":100},{"boxId":"94264000100U087","x":98.199997,"y":-108.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":93,"material":"","type":1,"place":100},{"boxId":"94264000100U077","x":98.199997,"y":-108.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":94,"material":"","type":1,"place":100},{"boxId":"94264000100U071","x":98.199997,"y":-98.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":95,"material":"","type":1,"place":100},{"boxId":"94264000100U066","x":98.199997,"y":-98.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":96,"material":"","type":1,"place":100},{"boxId":"94264000100U092","x":98.199997,"y":-88.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":97,"material":"","type":1,"place":100},{"boxId":"94264000100U086","x":98.199997,"y":-88.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":98,"material":"","type":1,"place":100},{"boxId":"94264000100U076","x":98.199997,"y":-78.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":99,"material":"","type":1,"place":100},{"boxId":"94264000100U070","x":98.199997,"y":-78.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":100,"material":"","type":1,"place":100},{"boxId":"94264000100U065","x":98.199997,"y":-68.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":101,"material":"","type":1,"place":100},{"boxId":"94264000100U091","x":98.199997,"y":-68.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":102,"material":"","type":1,"place":100},{"boxId":"94264000100U085","x":98.199997,"y":-58.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":103,"material":"","type":1,"place":100},{"boxId":"94264000100U075","x":98.199997,"y":-58.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":104,"material":"","type":1,"place":100},{"boxId":"94264000100U069","x":98.199997,"y":-48.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":105,"material":"","type":1,"place":100},{"boxId":"94264000100U064","x":98.199997,"y":-48.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":106,"material":"","type":1,"place":100},{"boxId":"94264000100U090","x":98.199997,"y":-38.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":107,"material":"","type":1,"place":100},{"boxId":"94264000100U084","x":98.199997,"y":-38.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":108,"material":"","type":1,"place":100},{"boxId":"94264000100T909","x":98.199997,"y":-28.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":109,"material":"","type":1,"place":100},{"boxId":"94264000100T885","x":98.199997,"y":-28.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":110,"material":"","type":1,"place":100},{"boxId":"94264000100T903","x":98.199997,"y":-18.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":111,"material":"","type":1,"place":100},{"boxId":"94264000100T891","x":98.199997,"y":-18.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":112,"material":"","type":1,"place":100},{"boxId":"94264000100T897","x":98.199997,"y":-8.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":113,"material":"","type":1,"place":100},{"boxId":"94264000100T908","x":98.199997,"y":-8.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":114,"material":"","type":1,"place":100},{"boxId":"94264000100T884","x":98.199997,"y":1.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":115,"material":"","type":1,"place":100},{"boxId":"94264000100T902","x":98.199997,"y":1.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":116,"material":"","type":1,"place":100},{"boxId":"94264000100T890","x":98.199997,"y":11.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":117,"material":"","type":1,"place":100},{"boxId":"94264000100T896","x":98.199997,"y":11.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":118,"material":"","type":1,"place":100},{"boxId":"94264000100T907","x":98.199997,"y":21.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":119,"material":"","type":1,"place":100},{"boxId":"94264000100T883","x":98.199997,"y":21.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":120,"material":"","type":1,"place":100},{"boxId":"94264000100T901","x":98.199997,"y":31.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":121,"material":"","type":1,"place":100},{"boxId":"94264000100T889","x":98.199997,"y":31.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":122,"material":"","type":1,"place":100},{"boxId":"94264000100T895","x":98.199997,"y":41.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":123,"material":"","type":1,"place":100},{"boxId":"94264000100T906","x":98.199997,"y":41.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":124,"material":"","type":1,"place":100},{"boxId":"94264000100T882","x":98.199997,"y":51.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":125,"material":"","type":1,"place":100},{"boxId":"94264000100T900","x":98.199997,"y":51.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":126,"material":"","type":1,"place":100},{"boxId":"94264000100T888","x":98.199997,"y":61.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":127,"material":"","type":1,"place":100},{"boxId":"94264000100T894","x":98.199997,"y":61.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":128,"material":"","type":1,"place":100},{"boxId":"94264000100T824","x":98.199997,"y":71.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":129,"material":"","type":1,"place":100},{"boxId":"94264000100T830","x":98.199997,"y":71.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":130,"material":"","type":1,"place":100},{"boxId":"94264000100T842","x":98.199997,"y":81.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":131,"material":"","type":1,"place":100},{"boxId":"94264000100T836","x":98.199997,"y":81.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":132,"material":"","type":1,"place":100},{"boxId":"94264000100T848","x":98.199997,"y":91.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":133,"material":"","type":1,"place":100},{"boxId":"94264000100T823","x":98.199997,"y":91.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":134,"material":"","type":1,"place":100},{"boxId":"94264000100T829","x":98.199997,"y":101.500000,"z":-41.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":135,"material":"","type":1,"place":100},{"boxId":"94264000100T841","x":98.199997,"y":101.500000,"z":169.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":136,"material":"","type":1,"place":100},{"boxId":"94264000100T835","x":98.199997,"y":-108.500000,"z":379.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":137,"material":"","type":1,"place":100},{"boxId":"94264000100T847","x":98.199997,"y":-98.500000,"z":379.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":138,"material":"","type":1,"place":100},{"boxId":"94264000100T822","x":98.199997,"y":-88.500000,"z":379.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":139,"material":"","type":1,"place":100},{"boxId":"94264000100T828","x":98.199997,"y":-78.500000,"z":379.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":140,"material":"","type":1,"place":100},{"boxId":"94264000100T840","x":98.199997,"y":-68.500000,"z":379.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":141,"material":"","type":1,"place":100},{"boxId":"94264000100T834","x":98.199997,"y":-58.500000,"z":379.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":142,"material":"","type":1,"place":100},{"boxId":"94264000100T846","x":98.199997,"y":-48.500000,"z":379.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":143,"material":"","type":1,"place":100},{"boxId":"94264000100T821","x":98.199997,"y":-38.500000,"z":379.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":144,"material":"","type":1,"place":100},{"boxId":"94264000100T827","x":98.199997,"y":-28.500000,"z":379.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":145,"material":"","type":1,"place":100},{"boxId":"94264000100T839","x":98.199997,"y":-18.500000,"z":379.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":146,"material":"","type":1,"place":100},{"boxId":"94264000100T833","x":98.199997,"y":-8.500000,"z":379.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":147,"material":"","type":1,"place":100},{"boxId":"94264000100T845","x":98.199997,"y":1.500000,"z":379.000000,"width":30.000000,"height":10.000000,"length":210.000000,"weight":11.900000,"platform":"platform25","order":148,"material":"","type":1,"place":100},{"boxId":"94264000100T818","x":98.699997,"y":11.500000,"z":349.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":149,"material":"","type":1,"place":100},{"boxId":"94264000100T794","x":98.699997,"y":21.500000,"z":349.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":150,"material":"","type":1,"place":100},{"boxId":"94264000100T809","x":98.699997,"y":31.500000,"z":349.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":151,"material":"","type":1,"place":100},{"boxId":"94264000100T789","x":98.699997,"y":41.500000,"z":349.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":152,"material":"","type":1,"place":100},{"boxId":"94264000100T813","x":98.699997,"y":51.500000,"z":349.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":153,"material":"","type":1,"place":100},{"boxId":"94264000100T805","x":98.699997,"y":61.500000,"z":349.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":154,"material":"","type":1,"place":100},{"boxId":"94264000100T797","x":98.699997,"y":71.500000,"z":349.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":155,"material":"","type":1,"place":100},{"boxId":"94264000100T801","x":98.699997,"y":81.500000,"z":349.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":156,"material":"","type":1,"place":100},{"boxId":"94264000100T817","x":98.699997,"y":91.500000,"z":349.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":157,"material":"","type":1,"place":100},{"boxId":"94264000100T793","x":98.699997,"y":101.500000,"z":349.000000,"width":31.000000,"height":10.000000,"length":150.000000,"weight":7.300000,"platform":"platform25","order":158,"material":"","type":1,"place":100}]';
			var jsonstr2 = '{"container_length":1192.000000,"container_width":231.800003,"container_height":227.000000,"container_max_load":null,"container_type_name":"40GP"}'
            var objectArray= JSON.parse(jsonstr);
			var truckJsonObj = JSON.parse(jsonstr2);
            var container, stats;
            var camera, controls, scene, projector, renderer;
            var objects = [], plane;
            var mouse = new THREE.Vector2(), offset = new THREE.Vector3(), INTERSECTED, SELECTED; 
            init();
            animate();
            function init() {
                container = document.createElement( 'div' );
                document.body.appendChild( container );
                camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 1, 10000 );
                camera.position.x = -600;
                camera.position.y = 400;
                camera.position.z = 1000;
                controls = new THREE.TrackballControls( camera );
                controls.rotateSpeed = 1.0;
                controls.zoomSpeed = 1.2;
                controls.panSpeed = 0.8;
                controls.noZoom = false;
                controls.noPan = true;
                controls.staticMoving = false;
                controls.dynamicDampingFactor = 0.3;
                scene = new THREE.Scene();
                var ambientLight = new THREE.AmbientLight( Math.random() *0xffffff );
                scene.add( ambientLight );
                var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
                directionalLight.position.set( 0, 1, 0 );
                scene.add( directionalLight );
                var pointLight = new THREE.PointLight( 0xff0000, 1, 500 );
                pointLight.position.set( 0, 0, -200 );
                scene.add( pointLight );

                container_length = truckJsonObj.container_length;
                container_width = truckJsonObj.container_width;
                container_height = truckJsonObj.container_height;
                var cube_1 = new THREE.Mesh(
                    new THREE.BoxGeometry( container_width, container_height, container_length, 1,1,1 ), 
                    new THREE.MeshBasicMaterial( { color:0xefb73e, wireframe:true } )
                );
                cube_1.position.x = 0;
                cube_1.position.y = 0;
                cube_1.position.z = 0;
                scene.add( cube_1 );

                truck_head_length = 145;
                var truck_head_1 = new THREE.Mesh(
                    new THREE.BoxGeometry( 200, 100, truck_head_length, 1, 1, 5 ), 
                    new THREE.MeshBasicMaterial( { color: 0xffffff, wireframe:true } )
                );
                truck_head_1.position.x = 0;
                truck_head_1.position.y = -50;
                truck_head_1.position.z = -(container_length/2 + truck_head_length/2);
                scene.add( truck_head_1 );
                
                truck_head_length_2 = 80;
                var truck_head_2 = new THREE.Mesh(
                    new THREE.BoxGeometry( 170, 60, truck_head_length_2, 1, 0, 5 ), 
                    new THREE.MeshBasicMaterial( { color: 0xffffff, wireframe:true } )
                );
                truck_head_2.position.x = 0;
                truck_head_2.position.y = 30;
                truck_head_2.position.z = -(container_length/2 + truck_head_length_2/2);
                scene.add( truck_head_2 );
                
                truck_head_chimney_radius = 7;
                var truck_head_chimney1 = new THREE.Mesh(
                    new THREE.CylinderGeometry( truck_head_chimney_radius, truck_head_chimney_radius, 300, 20 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_head_chimney1.position.x = 100;
                truck_head_chimney1.position.y = 50;
                truck_head_chimney1.position.z = -(container_length/2 + truck_head_chimney_radius/2);
                scene.add( truck_head_chimney1 );
                
                var truck_head_chimney2 = new THREE.Mesh(
                    new THREE.CylinderGeometry( truck_head_chimney_radius, truck_head_chimney_radius, 300, 20 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_head_chimney2.position.x = -100;
                truck_head_chimney2.position.y = 50;
                truck_head_chimney2.position.z = -(container_length/2 + truck_head_chimney_radius/2);
                scene.add( truck_head_chimney2 );
        
                var truck_wheel_1 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_1.position.x = 110;
                truck_wheel_1.position.y = -100;
                truck_wheel_1.position.z = -(container_length/2 + truck_head_length_2/2 + 20) ;
                truck_wheel_1.rotation.x = 0;
                truck_wheel_1.rotation.y = 0;
                truck_wheel_1.rotation.z = 1.6;
                scene.add( truck_wheel_1 );
                
                var truck_wheel_2 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_2.position.x = -110;
                truck_wheel_2.position.y = -100;
                truck_wheel_2.position.z = -(container_length/2 + truck_head_length_2/2 + 20);
                truck_wheel_2.rotation.x = 0;
                truck_wheel_2.rotation.y = 0;
                truck_wheel_2.rotation.z = 1.6;
                scene.add( truck_wheel_2 );

                offset_2 = -240;
                var truck_wheel_5 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_5.position.x = container_width/2 + 5;
                truck_wheel_5.position.y = -100;
                truck_wheel_5.position.z = (container_length/2 + truck_head_length_2/2 + offset_2) ;
                truck_wheel_5.rotation.x = 0;
                truck_wheel_5.rotation.y = 0;
                truck_wheel_5.rotation.z = 1.6;
                scene.add( truck_wheel_5 );

                var truck_wheel_6 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_6.position.x = -container_width/2 - 5;
                truck_wheel_6.position.y = -100;
                truck_wheel_6.position.z = (container_length/2 + truck_head_length_2/2 + offset_2);
                truck_wheel_6.rotation.x = 0;
                truck_wheel_6.rotation.y = 0;
                truck_wheel_6.rotation.z = 1.6;
                scene.add( truck_wheel_6 );

                for (var i in objectArray) {
                    if (objectArray[i].type==2) {
						var cylinderTopR = objectArray[i].length / 2;
						var cylinderHeight = objectArray[i].height;
						if (objectArray[i].place == 1 || objectArray[i].place == 2)
						{
							cylinderHeight = objectArray[i].width;
						}
						
                        var object2 = new THREE.Mesh(
						    new THREE.CylinderGeometry(cylinderTopR, cylinderTopR, cylinderHeight, 60),
                            new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff , wireframe:false } ) 
                        ); 
                        object2.position.x = objectArray[i].x;
                        object2.position.y = objectArray[i].y;
                        object2.position.z = objectArray[i].z;
                        if (objectArray[i].place==1) {
                            object2.rotation.z = 55;
                        }
                        if (objectArray[i].place==2) {
                            object2.rotation.x = 55;
                        }
                        object2.width = objectArray[i].width;
                        object2.height = objectArray[i].height;
                        object2.length = objectArray[i].length;
                        object2.weight = objectArray[i].weight;
                        object2.platform = objectArray[i].platform;
                        object2.order = objectArray[i].order;
                        object2.materialInfo = objectArray[i].material;
                        object2.boxId = objectArray[i].boxId;
                        object2.type = objectArray[i].type;
                        object2.place = objectArray[i].place;
                        scene.add( object2 );
                        objects.push( object2 );
                    }
                    if (objectArray[i].type==1) {
						if (objectArray[i].place == 200)
						{
							var box_length = objectArray[i].width;
                            var box_width = objectArray[i].length;
						}
						else
						{
							var box_length = objectArray[i].length;
							var box_width = objectArray[i].width;
						}
						var box_height = objectArray[i].height;
                        var object = new THREE.Mesh(
                            new THREE.BoxGeometry( box_width, box_height, box_length, 1, 1, 1 ), 
                            new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff , wireframe:false } ) 
                        ); 
                        object.position.x = objectArray[i].x;
                        object.position.y = objectArray[i].y;
                        object.position.z = objectArray[i].z;
						object.length = objectArray[i].length;
						object.width = objectArray[i].width;
						object.height = objectArray[i].height;
                        object.weight = objectArray[i].weight;
                        object.platform = objectArray[i].platform;
                        object.order = objectArray[i].order;
                        object.materialInfo = objectArray[i].material;
                        object.boxId = objectArray[i].boxId;
                        object.type = objectArray[i].type;
                        object.place = objectArray[i].place;
                        scene.add( object );
                        objects.push( object );
                    }
                }

                plane = new THREE.Mesh(
                    new THREE.PlaneGeometry( 2000, 2000, 8, 8 ),
                    new THREE.MeshBasicMaterial( { color: 0x000000, opacity: 0.25, transparent: true, wireframe: true } )
                );
                plane.visible = true;
                scene.add( plane );
                projector = new THREE.Projector();
                renderer = new THREE.WebGLRenderer( { antialias: true } );
                renderer.sortObjects = false;
                renderer.setSize( window.innerWidth, window.innerHeight );
                renderer.shadowMapEnabled = true;
                renderer.shadowMapType = THREE.PCFShadowMap;
                container.appendChild( renderer.domElement );

                stats = new Stats();
                stats.domElement.style.position = 'absolute';
                stats.domElement.style.top = '0px';
                container.appendChild( stats.domElement );

                window.addEventListener( 'resize', onWindowResize, false );
                renderer.domElement.addEventListener( 'mousemove', onDocumentMouseMove, false );
                renderer.domElement.addEventListener( 'mousedown', onDocumentMouseDown, false );
                renderer.domElement.addEventListener( 'mouseup', onDocumentMouseUp, false );
            }

            function onDocumentMouseMove( event ) {
                event.preventDefault();
                mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1;
                mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1;
                var vector = new THREE.Vector3( mouse.x, mouse.y, 0.5 );
                projector.unprojectVector( vector, camera );
                var raycaster = new THREE.Raycaster( camera.position, vector.sub( camera.position ).normalize() );
                var intersects = raycaster.intersectObjects( objects );
                if ( intersects.length > 0 ) {
                    if ( INTERSECTED != intersects[ 0 ].object ) {
                        INTERSECTED = intersects[ 0 ].object;
                        plane.position.copy( INTERSECTED.position );
                        plane.lookAt( camera.position );
                    }
                    container.style.cursor = 'pointer';
                } else {
                    container.style.cursor = 'auto';
                }
            }

            function onDocumentMouseDown( event ) {
                event.preventDefault();
                var vector = new THREE.Vector3( mouse.x, mouse.y, 0.5 );
                projector.unprojectVector( vector, camera );
                var raycaster = new THREE.Raycaster( camera.position, vector.sub( camera.position ).normalize() );
                var intersects = raycaster.intersectObjects( objects );
                if ( intersects.length > 0 ) {
                    controls.enabled = false;  
                    SELECTED = intersects[ 0 ].object;
                    var info = '<B>' + 
                        'boxId: ' + SELECTED.boxId +
                        '</br> x: ' + SELECTED.position.x + 
                        '</br> y: ' + SELECTED.position.y + 
                        '</br> z: ' + SELECTED.position.z + 
                        '</br> width: ' + SELECTED.width + 
                        '</br> height: ' + SELECTED.height + 
                        '</br> length: ' + SELECTED.length + 
                        '</br> weight: ' + SELECTED.weight +
                        '</br> platform: ' + SELECTED.platform +
                        '</br> order: ' + SELECTED.order +
                        '</br> material: ' + SELECTED.materialInfo + 
                        '</br> type: ' + SELECTED.type + 
                        '</br> place: ' + SELECTED.place + 
                        '</B>' +
                        '</br>' + 
                        '--------------------------' + 
                        '</br>' +
                        'type(1:箱体 2:圆柱体)' +
                        '</br>' +
                        'place(1:品字型 2:田字型)';
                    $("#objectInfo").html(info);
                }
            }

            function onDocumentMouseUp( event ) {
                event.preventDefault();
                controls.enabled = true;
                if ( INTERSECTED ) {
                    plane.position.copy( INTERSECTED.position );
                    SELECTED = null;
                }
                container.style.cursor = 'auto';
            }

            function onWindowResize() {
                camera.aspect = window.innerWidth / window.innerHeight;
                camera.updateProjectionMatrix();
                renderer.setSize( window.innerWidth, window.innerHeight );
            }

            function animate() {
                requestAnimationFrame( animate );
                render();
                stats.update();
            }

            function render() {
                controls.update();
                renderer.render( scene, camera );
            }

        </script>
        <div id="objectInfo" class="a2"><br/>点击物体获取相关属性</div>
        <style>
            .a2{position:absolute; left:20px; top:50px; bottom:0px; width:180px; height:250px; z-index:9999; background: #00FFFF; font-weight:bold; }
        </style>
    </body>
</html>